home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / dvxtec.zip / VI.TEC < prev    next >
Text File  |  1992-03-31  |  3KB  |  72 lines

  1.  
  2.                  Getting Started with VI
  3.  
  4. 'vi' is a screen oriented editor developed by Bill Joy for all UNIX systems.
  5. It is a powerful, portable, and somewhat learner hostile editor found on most
  6. UNIX systems today.   This document is not meant as a full blown tutorial but
  7. can be used as a quick introduction/reference so that you can do some basic
  8. editing using vi.   If you would like to learn more about vi and it's numerous
  9. options and features, there are several books on the subject including the
  10. man pages and the manuals that came with the UNIX operating system you are
  11. using.
  12.  
  13. Starting vi:
  14.  
  15.         vi
  16. or
  17.         vi filename
  18.     
  19. 'Vi' has two basic 'modes':
  20.     Command        vi interprets keystrokes as commands
  21.         Input           vi inputs keystrokes as data
  22.  
  23. Essential commands:
  24.  
  25. Cursor Movement                         Screen Control
  26. ---------------                         --------------
  27. l    one space to the right             CTRL-f    next screen
  28. h    one space to the left              CTRL-b    previous screen
  29. j    one line down                      CTRL-d    scroll forward
  30. k    one line up                        CTRL-u    scroll backward
  31. $    end of a line                      CTRL-l    redraw screen
  32. ^    start of a line
  33. w    next word
  34. e    end of a word
  35.  
  36. Entering Input Mode                     Making Changes
  37. -------------------                     --------------
  38. i    insert before cursor               cw   change word
  39. a    insert after cursor                cc   change line
  40. I    insert at beginning of line        C    to end of line
  41. A    insert at end of line              r    character at cursor
  42. O    open and insert in line above
  43. o    open and insert in line below
  44.  
  45. Making Deletions                        When in Insert Mode
  46. ----------------                        -------------------
  47. dw   delete word                        BACKSPACE delete character
  48. dd   delete line                        CTRL-w    delete word
  49. D    delete to end of line              ESC       return to command
  50. x    character at cursor                          mode
  51.  
  52. Misc. Functions                         Last Line Mode
  53. ---------------                         ---------------
  54. u    undo                               :w        write file
  55. /    search forward                     :q        quit
  56. ?    search backward                    :wq       write and quit
  57. n    next occurance                     :n        next file 
  58. .    repeat last action                 :r        read in a file
  59. Y    Yank a line                        :e        edit a file
  60. p    put below                          :f        file name
  61. P    put above                          :set      change options
  62. zz   write to file and quit             :!        shell escape
  63. ESC  cancel command                     :num      line num = the
  64.                                                   line number
  65.                                         :q!       quit editing don't
  66.                                                   save changes
  67.  
  68. This should be enough for simple editing.  For further instruction/
  69. information consult the manuals that came with your system or find one
  70. of the many good books on UNIX that will discuss the topic further.
  71.  
  72.